package com.ruoyi.rule.service.impl;

import java.util.Date;
import java.util.List;

import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;
import com.ruoyi.rule.mapper.RuleLogMapper;
import com.ruoyi.rule.domain.RuleLog;
import com.ruoyi.rule.service.IRuleLogService;

/**
 * 规则日志Service业务层处理
 *
 * @author changkang
 * @date 2025-05-11
 */
@Service
public class RuleLogServiceImpl implements IRuleLogService {
    @Resource
    private RuleLogMapper ruleLogMapper;

    /**
     * 查询规则日志
     *
     * @param id 规则日志主键
     * @return 规则日志
     */
    @Override
    public RuleLog selectRuleLogById(Long id) {
        return ruleLogMapper.selectRuleLogById(id);
    }

    /**
     * 查询规则日志列表
     *
     * @param ruleLog 规则日志
     * @return 规则日志
     */
    @Override
    public List<RuleLog> selectRuleLogList(RuleLog ruleLog) {
        return ruleLogMapper.selectRuleLogList(ruleLog);
    }

    /**
     * 新增规则日志
     *
     * @param ruleLog 规则日志
     * @return 结果
     */
    @Override
    public int insertRuleLog(RuleLog ruleLog) {
        ruleLog.setCreateTime(new Date());
        return ruleLogMapper.insertRuleLog(ruleLog);
    }

    /**
     * 修改规则日志
     *
     * @param ruleLog 规则日志
     * @return 结果
     */
    @Override
    public int updateRuleLog(RuleLog ruleLog)
    {
        return ruleLogMapper.updateRuleLog(ruleLog);
    }

    /**
     * 批量删除规则日志
     *
     * @param ids 需要删除的规则日志主键
     * @return 结果
     */
    @Override
    public int deleteRuleLogByIds(Long[] ids)
    {
        return ruleLogMapper.deleteRuleLogByIds(ids);
    }

    /**
     * 删除规则日志信息
     *
     * @param id 规则日志主键
     * @return 结果
     */
    @Override
    public int deleteRuleLogById(Long id)
    {
        return ruleLogMapper.deleteRuleLogById(id);
    }
}
